<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<ui:composition template="/templates/templateAluno.xhtml">
	<ui:define name="conteudo">
		<div style="float:left; width:170px">
			<ui:include src="/templates/aulaAluno.xhtml"></ui:include>
		</div>
		<div style="float:left; width:770px">
			<h:panelGrid columns="2">
			<h:outputText value="Nome: " />
			<h:outputText value="#{mBAulaAluno.aula.sala.nome}" />
			<h:outputText value="Horário: " />
			<h:outputText value="#{mBAulaAluno.aula.horario}" />
		</h:panelGrid>
		<h:form id="lista">
			<p:dataList value="#{mBAulaAluno.aula.arquivos}" var="arquivo" type="none">
				<f:facet name="header">
					Arquivos
				</f:facet>
				<p:column>
					<h:panelGrid columns="2">
						<h:outputText value="Título: " />
						<h:outputText value="#{arquivo.titulo}" />
						<h:outputText value="Data: " />
						<h:outputText value="#{arquivo.dataFormatada}" />
						<p:commandButton value="Download" ajax="false"  action="#{mBAulaAluno.download}">
							<f:setPropertyActionListener target="#{mBAulaAluno.arquivo}" value="#{arquivo.arquivo}" />
						</p:commandButton>
					</h:panelGrid>
					
				</p:column>
			</p:dataList>
		</h:form>
		
		
		</div>
		<div style="clear:both"></div>
			
	</ui:define>
</ui:composition>
</html>